3.6 \(\int (a+i a \tan (c+d x)) \, dx\)

Optimal. Leaf size=19 \[ a x-\frac{i a \log (\cos (c+d x))}{d} \]

[Out]

a*x - (I*a*Log[Cos[c + d*x]])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0074034, antiderivative size = 19, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.077, Rules used = {3475} \[ a x-\frac{i a \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[a + I*a*Tan[c + d*x],x]

[Out]

a*x - (I*a*Log[Cos[c + d*x]])/d

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (a+i a \tan (c+d x)) \, dx &=a x+(i a) \int \tan (c+d x) \, dx\\ &=a x-\frac{i a \log (\cos (c+d x))}{d}\\ \end{align*}

Mathematica [A]  time = 0.0058757, size = 19, normalized size = 1. \[ a x-\frac{i a \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[a + I*a*Tan[c + d*x],x]

[Out]

a*x - (I*a*Log[Cos[c + d*x]])/d

________________________________________________________________________________________

Maple [A]  time = 0.001, size = 23, normalized size = 1.2 \begin{align*} ax+{\frac{{\frac{i}{2}}a\ln \left ( 1+ \left ( \tan \left ( dx+c \right ) \right ) ^{2} \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a+I*a*tan(d*x+c),x)

[Out]

a*x+1/2*I*a/d*ln(1+tan(d*x+c)^2)

________________________________________________________________________________________

Maxima [A]  time = 1.09955, size = 23, normalized size = 1.21 \begin{align*} a x + \frac{i \, a \log \left (\sec \left (d x + c\right )\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+I*a*tan(d*x+c),x, algorithm="maxima")

[Out]

a*x + I*a*log(sec(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 1.20903, size = 50, normalized size = 2.63 \begin{align*} -\frac{i \, a \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+I*a*tan(d*x+c),x, algorithm="fricas")

[Out]

-I*a*log(e^(2*I*d*x + 2*I*c) + 1)/d

________________________________________________________________________________________

Sympy [A]  time = 0.49256, size = 24, normalized size = 1.26 \begin{align*} - \frac{i a \log{\left (e^{2 i d x} + e^{- 2 i c} \right )}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+I*a*tan(d*x+c),x)

[Out]

-I*a*log(exp(2*I*d*x) + exp(-2*I*c))/d

________________________________________________________________________________________

Giac [A]  time = 1.12551, size = 24, normalized size = 1.26 \begin{align*} a x - \frac{i \, a \log \left ({\left | \cos \left (d x + c\right ) \right |}\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+I*a*tan(d*x+c),x, algorithm="giac")

[Out]

a*x - I*a*log(abs(cos(d*x + c)))/d